<include file="Public/min-header" />
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> 优惠券列表</h3>
                </div>
                <div class="panel-body">
                    <div class="navbar navbar-default">
                        <form class="navbar-form form-inline" action="" method="post">
                            <!--
                                    <div class="form-group">
                                        <input type="text" class="form-control" placeholder="搜索">
                                    </div>
                                    <button type="submit" class="btn btn-primary">提交</button>
                            -->
                            <div class="form-group pull-right">
                                <a href="{:U('Coupon/add_coupon')}" class="btn btn-primary pull-right"><i class="fa fa-plus"></i>添加优惠券</a>
                            </div>
                        </form>
                    </div>
                    <div id="ajax_return">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th style="width: 1px;" class="text-center">
                                            <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);">
                                        </th>
                                        <th class="text-center">
                                            优惠券名称
                                        </th>
                                        <th class="text-center">
                                            发放类型
                                        </th>
                                        <th class="text-center">
                                            订单号
                                        </th>
                                        <th class="text-center">
                                            使用会员
                                        </th>
                                        <th class="text-center">
                                            使用时间
                                        </th>
                                        <if condition="($type eq 4)">
                                            <th class="text-center">
                                                优惠券码
                                            </th>
                                        </if>
                                        <th class="text-center">
                                            操作
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <volist name="lists" id="list">
                                        <tr>
                                            <td class="text-center">
                                                <input type="checkbox" name="selected[]" value="6">
                                            </td>
                                            <td class="text-left">{$list.name}</td>
                                            <td class="text-left">{$coupon_type[$list[type]]}</td>
                                            <td class="text-left">{$list.order_sn}</td>
                                            <td class="text-left">{$list.nickname}</td>
                                            <td class="text-center">
                                                <if condition="$list[use_time] gt 0">
                                                    {$list.use_time|date='Y-m-d H:i',###}
                                                    <else/> N
                                                </if>
                                            </td>
                                            <if condition="($list[type] eq 4) and ($list[code] neq '')">
                                                <td class="text-center">
                                                    {$list.code}
                                                </td>
                                            </if>
                                            <td class="text-left">
                                                <a href="{:U('Admin/Coupon/couponListDel',array('id'=>$list['id']))}" id="button-delete6" data-toggle="tooltip" title="" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a></td>
                                        </tr>
                                    </volist>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6 text-left"></div>
                        <div class="col-sm-6 text-right">{$page}</div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
</body>

</html>
